﻿<%@ Page Title="商品" Language="C#" MasterPageFile="~/search/SearchMastePage.master" AutoEventWireup="true" 
CodeBehind="item.aspx.cs" Inherits="map.search.item" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<%@ Register assembly="RuleCode.Common" namespace="RuleCode.Controls" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">
  
    <style type="text/css">
        .style_t1
        {
            width: 100%;
            
        }
        .style_t2
        {
            width: 100%;
           
        } 
                
           
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 200px;
            vertical-align: top;
        }
         .itemcateSelectDiv , .shopcateSelectDiv
        {
            padding:5px 0px 5px 0px;
            text-align:left;
        }
        .itemcateSelectDiv  select,.shopcateSelectDiv select
        {
            width:120px;
        }
        .itemcateSelectUl
        {
            list-style-type:none;
        }
        .ErrorMsgP
       {
           border :solid 1px red;
           background-color:#FFF2F2;
           width:150px;       
           margin-top:3px;
       }
         .MasterDiv
       {
           width:100%;
       } 
       .DataListHeaderTable
       {
           width:100%;
           padding-top:5px;
          background:url(/img/small_tab_bg.gif) repeat;
       }
       .DataListItemTable
       {
            width:100%;
           height :170px;
           margin:4px 0px 4px 0px;
           border-left:solid 1px #A1C67B;
           border-right:solid 1px #A1C67B;
           padding:0; margin:0; border-collapse:collapse;
       }
       .DataListItemTable td
       {
           text-align:left ;
       }
       .DataListItemTable td img
       {
           border:none;
       }
       .DataListHeaderToolDiv , .DataListFooterToolDiv
       {
           width:100%;
           margin-top:2px;
           border-top:solid 1px lightGray;
           border-bottom: solid 1px lightGray;
           background-color:#ECECEC;
           padding-top:3px;
           padding-bottom :3px;
       }
       .DataListHeaderToolDiv table , .DataListFooterToolDiv table
       {
           padding-left:30px;
       }
       .DataListFooterToolDiv table td ,.DataListHeaderToolDiv table td
       {
           padding-left:5px;
       }
 
     
      
       .allItemsUl li
       {
           border-bottom:solid 1px lightBlue;
           background: url(../img/tagleft.gif) no-repeat left top;
           height:23px;
           
           display:inline;
           list-style-type:none;  
           margin-left:5px;
       }
       .allItemsUl li a
       {
           line-height:23px;
           background:url(../img/tagright.gif) no-repeat right top;
           padding-left:10px;
           padding-right:10px;
           
       }
       .itemOperateButton
       {
           width:60px;
       }
    </style>
  
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
    <script src="../js/dropdowncontent.js" type="text/javascript"></script>
    <script src="../js/JScript1.js" type="text/javascript"></script>

    <script src="../js/dom-drag.js" type="text/javascript"></script>
     <script type="text/javascript">
         function selall() {
             currecid = '';
             var link = "item.aspx";
             window.location.href = link;
         }
function selarea2(a) {
    currecid = a;
    var keyvalue = document.getElementById("ctl00_ctl00_ContentPlaceHolder1_TextBox1").value;
    var link = "../search/item.aspx?keyvalue=" + keyvalue + "&area4recid=" + currecid;
    window.location.href = link;

}
function btnclick() {
    var keyvalue = document.getElementById("ctl00_ctl00_ContentPlaceHolder1_TextBox1").value;
    keyvalue = encodeURI (keyvalue);
   
    var link = "item.aspx?keyvalue=" + keyvalue + "&area4recid=" + currecid;
    window.location.href = link;
   
}

function initsdsfd(keyvalue, area4recid) {
    var map = new GMap2(document.getElementById("map_canvas"));
    if (area4recid == '' || area4recid == 'undefined') {
        if (keyvalue != 'undefined') {
            document.getElementById("ctl00_ctl00_ContentPlaceHolder1_TextBox1").value = keyvalue;
        }
        var province = "";
        var result = AjaxFunction.getCurrentState();
        if (result.value != null && result.value != "") {
            province = result.value;
        }
        if (province == "")
            province = "北京";
        geocoder = window.geocoder || (new GClientGeocoder());
        if (geocoder) {
            geocoder.getLatLng(
                    (province == "吉林") ? "吉林省" : province,
                    function(point) {
                        if (!point) {
                            alert("不能解析: " + province);
                        } else {
                            map.setCenter(point, 10);
                        }
                    }
            );
        }
        return;
    }
    currecid = area4recid;

    document.getElementById("ctl00_ctl00_ContentPlaceHolder1_TextBox1").value = keyvalue;
    var area3id = AjaxFunction.Getarea3id(area4recid).value;
    var result = AjaxFunction.Getselarea1(area3id);
    if (result != null && result.value != null) {
        document.getElementById("area4").innerHTML = result.value;
    }
    document.getElementById("a" + area4recid).className = "style_t3";
    var result = AjaxFunction.Getselarea2(currecid);
    if (result != null && result.value != null) {
        var s = result.value.split("|");
        map.setCenter(new GLatLng(s[2], s[1]), 14);
        var point1 = new GLatLng(s[2], s[1]);
        var marker1 = new GMarker(point1);
        GEvent.addListener(marker1, "click", function() {
            marker1.openInfoWindowHtml(s[3]);
        });
        map.addOverlay(marker1);
    }
}

</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" runat="server">
<asp:Literal ID="Literal_map" runat="server"></asp:Literal>
    <div id="container" >


<table style ="width:100%; margin-top:5px;"><tr><td>
    <div id="panel_map_id_5" style ="width:100%; background-color:#DFF0CB;
     border:solid 1px #8ACD3E;">

   <asp:Literal ID="Literal1" runat="server"></asp:Literal>     
    </div>
</td></tr></table>

<div id="mainList" style="width:100%">
<table   style ="width:100%; height :34px; padding:0; margin:0; border :0; border-collapse:collapse;" >
                        <tr>
                        <td   style=" vertical-align:top;">
<div class ="MasterDiv">
          
            <asp:DataList ID="MainDataList" runat="server" DataKeyField ="RECID" 
                  Width="100%" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" 
                  BorderWidth="1px" CellPadding="4" GridLines="Vertical" ItemStyle-BorderStyle="Solid" 
                                    ForeColor="Black">
                    <FooterStyle BackColor="#CCCC99" />
                    <AlternatingItemStyle BackColor="White" />
                    <ItemStyle  Width ="100%" BackColor="White" ForeColor="#003399" BorderStyle="Solid" BorderColor="#FFFFFF" />
                    <SelectedItemStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <ItemTemplate>
                        <div style =" border-bottom:solid 1px #A1C67B;">
                        <table  id ="shoptitle" style ="width:100%; height :34px; padding:0; margin:0; border :0; border-collapse:collapse;" >
                        <tr>
                        <td style ="background-image:url(/img/bar2.gif); background-position:right; background-repeat:repeat-x;">
                        <a href="/member/i.aspx?id=<%#Eval("RECID") %>" target="_blank">
                        <%# RuleCode.Table.cbuser.CutString( Eval("taobaotitle").ToString(),50,"..")%></a>
                        </td>
                        <td style ="width:80px; 
                            background-image:url(/img/bar1.gif); background-position:right; background-repeat:no-repeat;">
                        
                        </td>
                        </tr>
                        </table>
                        <table class ="DataListItemTable">
                        <tr>
                             
                                <td style =" width:170px;" title ="图片">
                                <a href="/member/i.aspx?id=<%#Eval("RECID") %>" target="_blank">
                                    <img style=" width:160px; height :160px; border:solid 1px #D2D2D2;"  alt="" 
                                    src ='<%# (Eval("taobaopic_path").ToString()=="") ? "/img/upItem.gif":(Eval("taobaopic_path").ToString())%>' />
                                </a>
                                </td>
                                <td  style ="text-align:left ; vertical-align:top; color:Black; line-height:20px;">
                                    商品:<%# Eval("taobaotitle").ToString()%><br />
                                    店铺:<a href="/s.aspx?id=<%# Eval("userRECID").ToString()%>" target="_blank"><%# Eval("cbshoptitle").ToString()%></a><br />
                                   位置: <%# Eval("省编码").ToString()%>-<%# Eval("区编码").ToString()%>-<%# Eval("区域编码").ToString()%>-<%# Eval("BizAreaName").ToString()%><br />
                                   卖家: <%#Eval("cbusernickname").ToString()%>
                                   <%# RuleCode.Table.cbuser.getChatStrfromuserid(Eval("taobaoUserId").ToString())%> <br />
                                   当前价格:<%#Eval ("taobaoprice").ToString () %> &nbsp;&nbsp;
                                   运费:<br />
                                   联系电话:<%# Eval("jcmobile").ToString () %><br />
                                   数量:<%# Eval("taobaonum").ToString () %><br />
                                   上架时间:<%#Eval("taobaolist_time").ToString().Trim().Length == 19 ? Eval("taobaolist_time").ToString().Substring(0,10) : Eval("taobaolist_time").ToString().Substring(0,8)%>
                                </td>
                            </tr>
                        </table>
                      
                       </div>
                    </ItemTemplate>
                </asp:DataList>
                <div id="NoDataDiv" runat ="server"  style =" vertical-align:middle ; margin:3px 0px 3px 0px; padding-left:20px; ">
                    <span style =" color :Red ">对不起， 没有找到你查找的数据！</span>
                </div>
                
                 <asp:Label ID="TotalCountLabel" ForeColor ="Gray"  Font-Size="Smaller" runat="server" Text="Label"></asp:Label>
                <cc1:WebPager ID="WebPager1" runat="server" ControlToPaginate="MainDataList" 
            onpageindexchanged="WebPager1_PageIndexChanged" PageSize="10" />
            </div>

  


</td>
                        <td style ="width:3px;">
                        
                         </td>
                        <td style ="width:240px;  vertical-align:top; ">
                         <div id = "map_canvas" style ="width:100%; height :240px;border:solid 1px #8ACD3E; margin-top:3px; margin-right:2px; z-index:-1;">
                        
                        </div>
                       <%-- <table style ="width:100%; height :240px; border:solid 1px #8ACD3E; margin-top:3px; margin-right:2px; ">
                        <tr><td style ="vertical-align:top;">
                       
                        </td></tr>
                        </table>--%>
                         </td>
                        </tr>
                        </table>
<%--</ContentTemplate>
</asp:UpdatePanel>--%>
  

</div>


       

</div>
 <script type="text/javascript">
     function subInit() {
         $("#netshoping").removeClass("actived");
         $("#productlist").addClass("actived");
     }
 </script>
</asp:Content>
